package com.project.web.wechat.service.impl.app;

import com.project.web.course.service.impl.common.BaseServiceImpl;
import com.project.web.wechat.mapper.app.WxBizWelcomeMsgMapper;
import com.project.web.wechat.model.app.WxBizWelcomeMsg;
import com.project.web.wechat.service.app.WxBizWelcomeMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 企业微信欢迎语业务实现类
 *
 * @author wyy
 * @date 2020-06-29
 */
@Service("wxBizWelcomeMsgServiceImpl")
public class WxBizWelcomeMsgServiceImpl extends BaseServiceImpl<WxBizWelcomeMsg, Long> implements WxBizWelcomeMsgService {

    @Autowired
    private WxBizWelcomeMsgMapper wxBizWelcomeMsgMapper;

    /**
     * 根据渠道编码和用户ID查询欢迎语
     *
     * @param userId
     * @param channelCode
     * @return
     */
    @Override
    public WxBizWelcomeMsg getByChannelAndUserId(String userId, String channelCode) {
        return wxBizWelcomeMsgMapper.getByChannelAndUserId(userId, channelCode);
    }
}
